基于Tensorflow使用CPU而不用GPU问题的解决

您所在的位置:网站首页 tensorflow 114的cuda版本 基于Tensorflow使用CPU而不用GPU问题的解决

基于Tensorflow使用CPU而不用GPU问题的解决

#基于Tensorflow使用CPU而不用GPU问题的解决| 来源: 网络整理| 查看: 265

之前的文章讲过用Tensorflow的object detection api训练MobileNetV2-SSDLite,然后发现训练的时候没有利用到GPU,反而CPU占用率贼高(可能会有Could not dlopen library 'libcudart.so.10.0'之类的警告)。经调查应该是Tensorflow的GPU版本跟服务器所用的cuda及cudnn版本不匹配引起的。知道问题所在之后就好办了。

检查cuda和cudnn版本

 首先查看cuda版本:

cat /usr/local/cuda/version.txt

 以及cudnn版本:

cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2

重新安装对应版本Tensorflow

 根据前面查看得到的cuda和cudnn版本,到Tensorflow官网查看对应的Tensorflow-GPU版本,然后用conda install tensorflow-gpu=[version]重新安装(把[version]换成对应的版本比如1.12)就OK了。



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3